package Structural.Proxy.demo1;

import com.google.common.base.Stopwatch;

import java.util.concurrent.TimeUnit;

public class TimeProxy implements MoveAble {

	MoveAble moveAble;

	public TimeProxy(MoveAble moveAble) {
		this.moveAble = moveAble;
	}

	@Override
	public void move() {
		Stopwatch watch = Stopwatch.createStarted();
		moveAble.move();
		System.out.println("use=====>" + watch.elapsed(TimeUnit.SECONDS));
	}
}
